package cn.sunshine.framework.context;

import cn.sunshine.framework.beans.BeansException;

/**
 * @Description SPI interface to be implemented by most if not all application contexts.
 * Provides facilities to configure an application context in addition
 * to the application context client methods in the
 * {@link cn.sunshine.framework.context.ApplicationContext} interface.
 * @Author Mokairui
 * @Since 2021/12/11
 */
public interface ConfigurableApplicationContext extends ApplicationContext {

    /**
     * 刷新容器, 自动处理内部构造细节, 不用让用户去创建 DefaultListableBeanRegistry
     * @throws BeansException
     */
    void refresh() throws BeansException;

    void registerShutdownHook();

    void close();

}
